# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

_realname=Sub-Quote
pkgname=perl-${_realname}
pkgver=2.006003
pkgrel=1
pkgdesc="efficient generation of subroutines via string eval"
arch=('any')
url="https://search.cpan.org/dist/Sub-Quote/"
license=('PerlArtistic' 'GPL')
depends=('perl')
makedepends=('perl-Test-Fatal>=0.010')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/H/HA/HAARG/Sub-Quote-${pkgver}.tar.gz)
sha512sums=('d486556750fa8cf8152f86204ed2156ff33dd4ba467955c3f9621b67b68acb543f953eb1476297a85d3ee2bc9755072491ad9d34c33a496d5ba5828c687f6d83')

prepare() {
  cd ${_realname}-${pkgver}
}

build() {
  cd ${_realname}-${pkgver}
  PERL_MM_USE_DEFAULT=1 \
  PERL_AUTOINSTALL=--skipdeps \
  PERL5LIB="" \
  MODULEBUILDRC=/dev/null \
  PERL_MM_OPT="INSTALLDIRS=vendor" \
  PERL_MB_OPT="--installdirs vendor" \
  perl Makefile.PL
  make
}

package() {
  cd ${_realname}-${pkgver}
  make install DESTDIR="${pkgdir}"
}
